<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp"%>
<html>
	<head>
		<meta charset="UTF-8">
		<title>我要投资-新手专享列表</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<jsp:include page="/include/wchat/head.jsp"></jsp:include>
		<link type="text/css" rel="stylesheet"
			href="/v2/wchat/resrc/css/invest.css">
	</head>

	<body>
		<div id="header">
			<a href="/wchatIndex.do" class="backto">返回</a>
			<div class="title-sub">
				新手专享
			</div>
		</div>
		<div id="wrap">
			<div class="ad">
				<img src="/v2/wchat/resrc/img/banner/novice.jpg">
			</div>
			<div class="loan-invest">

				<!--投资项目-->
				<s:if test="#request.xsLoans.size>0">
				<s:iterator value="#request.xsLoans" var="wyb">
				<s:if test="#wyb.borrowStatus == 2">
				<div class="table-invest" data-url="/wchatXsLoansDetail.do?id=${wyb.id}">
					<h2>
						稳盈宝&nbsp ${wyb.borrowNumber}
						<span class="status">可投资</span>
					</h2>
					<ul class="items">
						<li class="c1">
							年化收益率
							<span class="git per"><s:property value="#wyb.annualRate" default="0" /><b>%</b>
							</span>
						</li>
						<li class="c2">
							期限
							<span class="git time"> <s:property value="#wyb.deadline" default="0" />
								<b>
									<s:if test="%{#wyb.isDayThe ==1}">个月</s:if>
									<s:else>天</s:else>
								</b> 
							</span>
						</li>
						<li class="c3">
							剩余
							<span class="git money"> ${fn:substringBefore(wyb.investNum,'元')} <b>元</b> </span>
						</li>
					</ul>
				</div>
				</s:if>
				<s:else>
				<div class="table-invest disabled" data-url="/wchatXsLoansDetail.do?id=${wyb.id}">
					<h2>
						稳盈宝&nbsp ${wyb.borrowNumber}
						<s:if test="#wyb.borrowStatus == 3">
							<span class="status">已售完</span>
						</s:if>
						<s:elseif test="#wyb.borrowStatus == 4">
							<span class="status">还款中</span>
						</s:elseif>
						<s:elseif test="#wyb.borrowStatus == 5">
							<span class="status">已还完</span>
						</s:elseif>
					</h2>
					<ul class="items">
						<li class="c1">
							年化收益率
							<span class="git per"><s:property value="#wyb.annualRate" default="0" /><b>%</b>
							</span>
						</li>
						<li class="c2">
							期限
							<span class="git time"> <s:property value="#wyb.deadline" default="0" />
								<b>
									<s:if test="%{#wyb.isDayThe ==1}">个月</s:if>
									<s:else>天</s:else>
								</b> 
							</span>
						</li>
						<li class="c3">
							剩余
							<span class="git money"> 0.00 <b>元</b> </span>
						</li>
					</ul>
				</div>
				</s:else>
				</s:iterator>
				</s:if>
			</div>

			<div class="page">
				<s:if test="#request.currentPage  <= 1">
					<span class="disabled pre"> 上一页 </span>
				</s:if>
				<s:else>
					<a href="javascript:;" onclick="return $pager.go(${currentPage-1});" class="pre">上一页 </a>
				</s:else>
					<a href="javascript:;" onclick="return $pager.go(${currentPage+1});" class="next">下一页 </a>
			</div>
			
			<form id="pageSearchForm" name="pageSearchForm" action="/wchatxsLoanList.do" method="post"></form>
			
			<script type="text/javascript">
			//分页js形式带参请求
			var $pager = (function(manager) {
    			var _params = {};
    			manager.go = function(page) {
        			if(page > 5){
            			page = 5;
        			}
        			var htmlStr = '<input type="hidden" name="page" value="' + page + '" />';
        			for (var key in _params) {
            			htmlStr += '<input type="hidden" name="' + key + '" value="' + _params[key] + '" />';
        			}
        			$("#pageSearchForm").html(htmlStr).submit();
    			};
    			manager.create = function(params) {
        			_params = params;
    			};
    			return manager;
			} ($pager || {}));
			</script>
			
	</div>
	<jsp:include page="/include/wchat/footer.jsp"></jsp:include>
	</body>
</html>